package com.mm.learn;/**
 * @author wdx
 * @create 2021-09-01 10:31
 */

import com.mm.learn.spring.User;
import org.springframework.web.bind.annotation.*;

/**
 * 测试控制器
 * @author wdx
 * @date 2021年09月01日 10:31
 *
 */
@RestController
@RequestMapping("/test")
public class TestConreoller {

    /**
     * 测试01
     * @param id
     * @return
     */
    @GetMapping("/{id}")
    public ApiResult<User> test01(@PathVariable String id){
        return ApiResult.success(new User());
    }

    /**
     * 测试02
     * @param user
     * @return
     */
    @GetMapping
    public User test02(User user){
        return new User();
    }

    /**
     * 测试03
     * @param user
     * @return
     */
    @PostMapping
    public User test03(@RequestBody User user){
        return new User();
    }
}
